Events

event-list clearfix">

Events on //

", "show:

__title__

", "show:

", "show:Time: __eventtimes__   ", "show:Location: __location__", "show:

", "show:", "show:|~", "noecho", "noedit" ); if (trim($rawEvents) != '') { $rawEvents = explode("|~", trim($rawEvents, "|~")); $myEvents = array(); foreach ($rawEvents as $rawEvent) { $rawEventArray = explode("~~", $rawEvent); $ymd = $rawEventArray[0]; $month_machine = date('Ym', strtotime($ymd)); $myEvents[$month_machine][$ymd][] = $rawEventArray[1]; } $end_month = $month_machine; //last month with an event, used to make sure we don't NRF elements after it. //add missing months - this was kind of an oversight when I first was figuring out how //to execute the display of the list view ... so it's more of a patch than a shining //example of elegance. foreach ($myEvents as $month_machine => $val) { if ($month_machine != $end_month) { $moNum = substr($month_machine, -2); $yearNum = substr($month_machine, 0, 4); if ($moNum == 12) { $moNum = 1; $yearNum++; } else { $moNum++; } $moNum = str_pad((int)$moNum, 2, "0", STR_PAD_LEFT); while (!isset($myEvents[$yearNum . $moNum])) { $myEvents[$yearNum . $moNum] = array('nrf' => "No results found."); if ($moNum == 12) { $moNum = 1; $yearNum++; } else { $moNum++; } $moNum = str_pad((int)$moNum, 2, "0", STR_PAD_LEFT); } } } ksort($myEvents); //new elements are at the end.... until NOW. //display our list view $output = ""; foreach ($myEvents as $month_machine => $days) { $output .= "
"; $output .= "
"; if( !$daylisting['day'] ) { // Only if this is NOT a specific day listing, do we need the month/year title here $output .= "
"; $output .= date('F Y', strtotime($month_machine . "01")); $output .= "
"; } $output .= ""; $output .= "
"; $output .= "
"; if ($days['nrf']) { $output .= "

No events were found for this month.

"; } else { foreach ($days as $day => $itema) { $ts = strtotime($day); $output .= "
"; $output .= "
"; $output .= "

" . date('M', $ts) . "

"; $output .= "

" . date("d", $ts) . "

"; $output .= "
"; $output .= "
"; $output .= "

" . date('l', $ts) . "

"; foreach ($itema as $item) { $output .= $item; } $output .= "
"; $output .= "
"; } } $output .= "
"; } echo $output; } else { // No events were found echo '
'; echo '
'; echo '

No events found.

'; echo '
'; echo '
'; } ?>

View events on our list view.

,", "headingletters:4" ); ?>

Search results for |

", "show:

__title__

", "show:

", "show:Time: __eventtimes__   ", "show:Location: __location__", "show:

", "show:", "show:|~", "noecho", "noedit" ); } $output = ""; if (!$rawEvents) { $output = "

No results were found for “" . $search_term . "”

"; } else { $rawEvents = explode("|~", trim($rawEvents, "|~")); $myEvents = array(); foreach ($rawEvents as $rawEvent) { $rawEventArray = explode("~~", $rawEvent); $ymd = $rawEventArray[0]; $month_machine = date('Ym', strtotime($ymd)); $myEvents[$month_machine][$ymd][] = $rawEventArray[1]; } foreach ($myEvents as $month_machine => $days) { $output .= ""; } } echo $output; ?>